package com.czz.manage.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @ClassName: Course
 * @Author Czz
 * @Date 2020/1/19
 * @Time 17:11
 **/
@Data
@TableName(value = "edu_course")
@Accessors(chain = true)
public class Course {
    @TableId(value = "course_id", type = IdType.ID_WORKER_STR)
    private String courseId;

    @TableField(value = "teacher_id")
    private String teacherId;

    @TableField(value = "category_id")
    private String categoryId;

    @TableField(value = "category_parent_id")
    private String categoryParentId;

    @TableField(value = "course_name")
    private String name;

    @TableField(value = "course_price")
    private BigDecimal price;

    @TableField(value = "course_lesson_sum")
    private Integer lessonSum;

    @TableField(value = "course_buy_sum")
    private Integer buySum;

    @TableField(value = "course_cover")
    private String cover;

    @TableField(value = "course_status")
    private Integer status;

    @TableField(value = "course_level")
    private Integer level;

    @Version
    @TableField(value = "version")
    private Long version;

    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;
}
